A basic principle of video coding compression is to remove redundancy as much as possible by using relevance between space domains, relevance between time domains, and relevance between code words. Currently, a popular method is to implement video coding compression by using a block-based mixed video coding frame, and by using steps such as prediction, transformation, quantification, and entropy coding. From an earliest MPEG-1 to an latest video coding standard H.264/AVC, and even a next generation of video coding compression standard which is being formulated by a JCTVC working group (a joint working group founded by MPEG and VECG), and high efficiency video coding (HEVC) all use the block-based mixed video coding frame.
An intra coding technology in a standard H.264 uses relevance of a neighboring block and uses multi-direction prediction to improve prediction precision. For example, in the H.264, there are nine IPmodes (Intra Prediction mode, intra prediction modes) for prediction of a 4×4 luminance component, including eight directional intra prediction modes and one non-directional prediction mode, that is, a DC mode (Direct Current mode, direct current prediction mode) or referred to as a DC prediction mode. The directional intra prediction mode actually represents information of different texture directions. In an intra coding technology, prediction is performed according to the intra prediction mode, so as to obtain a prediction residual error, then, transformation, quantification, and entropy coding are performed on the residual error, and finally, a compressed code stream is generated. At a decoding end, a decoded image is obtained after decoding is performed according to the intra prediction mode and information of the prediction residual error. Correspondingly, coding and decoding need to be performed on the intra prediction mode.
In a coding and decoding method stipulated in the H.264, an intra prediction mode of a current block is coded by using a coding manner based on an MPM (Most Probable Mode, most probable mode), and a specific process is as follows: 1) an MPM of the current block is predicted according to information of an intra prediction mode of a neighboring block; and 2) then the intra prediction mode of the current block is coded according to the MPM.
A HEVC draft standard uses a CU (Coding Unit, coding unit), a PU (Prediction Unit, prediction unit), and a TU (Transform Unit, Transform Unit), which are divided into multiple units by function, and a new tree structure is used to describe these units, for example, the CU may be divided into smaller CUs according to a quadtree, and the smaller CUs may be further divided, thereby forming a quadtree structure. The PU and the TU also have similar tree structures. The CU, the PU, and the TU all essentially belong to a concept of a block (block) or a sub-block (sub-block), the CU is similar to a macro block MB or a coding block, the PU may be referred to as a prediction block, the TU may correspond to a transform block, and the like. In the HEVC draft standard, they are collectively referred to as a TreeBlock, so as to reflect a tree structure characteristic.
In the HEVC draft standard, an intra prediction technology thereof is similar to that in the H.264 and a multi-direction prediction technology is also used, but the number of block sizes and the number of prediction directions are further extended therein. In a coding and decoding method stipulated in the HEVC draft standard, the intra prediction mode of the current block is coded by using an MPM-based coding manner.
In order to obtain the MPM, both the H.264 and the HEVC draft include a mapping process of mapping the intra prediction mode of the neighboring block to obtain an MPM corresponding to the current block, and an LUT table (Look-up Table, look-up Table) is introduced into the mapping process. Specifically, according to the intra prediction mode of the neighboring block, the MPM of the current block can be obtained by looking up the LUT table, that is, an input of the LUT table is the intra prediction mode of the neighboring block, and an output is the MPM of the current block. The LUT table is generally obtained according to relevance of a texture direction corresponding to the intra prediction mode. In addition, the HEVC involves block sizes in multiple sizes and different corresponding value ranges (for example, 0-2, 0-4, 0-16, 0-33, and the like) of the intra prediction mode, and therefore, in the HEVC draft, multiple LUT tables are introduced into the foregoing mapping process.
However, multiple LUT tables need to be used in the mapping process, so that a certain memory overhead is occupied, and a system resource utilization rate is reduced.